package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(50)"`
	Password string `gorm:"type:varchar(50)"`
}
type UserRole struct {
	gorm.Model
	uid int `gorm:"type:int"`
	rid int `gorm:"type:int"`
}
type Role struct {
	gorm.Model
	RoleName string `gorm:"type:varchar(50)"`
}
type RoleCode struct {
	gorm.Model
	Rid int `gorm:"type:int"`
	Cid int `gorm:"type:int"`
}
type Code struct {
	gorm.Model
	CodeName string `gorm:"type:varchar(50)"`
}

// 商品
type Product struct {
	gorm.Model
	ProductCode string `gorm:"type:varchar(50)"`
	ProductName string `gorm:"type:varchar(50)"`
}

// 订单
type Order struct {
	gorm.Model
	OrderCode string `gorm:"type:varchar(50)"`
	OrderName string `gorm:"type:varchar(50)"`
}
